//	AttachmentRecord.java
//	Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
package com.fzc.rhinooffice.module.entity;

import android.graphics.Bitmap;

import org.json.JSONException;
import org.json.JSONObject;


public class AttachmentRecord{

	public String url;	//附件下载地址
	public String name;	//附件名称


	public Bitmap bm;	//附件缩略图
	public String fileSize;	//附件大小
	public String sdPath;	//附件位置


	public void setName(String name){
		this.name = name;
	}
	public String getName(){
		return this.name;
	}
	public void setUrl(String url){
		this.url = url;
	}
	public String getUrl(){
		return this.url;
	}
	public AttachmentRecord(){}
	/**
	 * Instantiate the instance using the passed jsonObject to set the properties values
	 */

	public AttachmentRecord(JSONObject jsonObject){
		if(jsonObject == null){
			return;
		}
		name = jsonObject.optString("name");
		url = jsonObject.optString("url");
	}

	/**
	 * Returns all the available property values in the form of JSONObject instance where the key is the approperiate json key and the value is the value of the corresponding field
	 */
	public JSONObject toJsonObject()
	{
		JSONObject jsonObject = new JSONObject();
		try {
			jsonObject.put("name", name);
			jsonObject.put("url", url);
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return jsonObject;
	}

}